package org.example.t0601;

import java.util.Scanner;

/**
 * 输入5个数字，按照升序排列输出
 */
public class Sort {

    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        System.out.print("请输入：");
        int [] array = new int[5];
        for( int i = 0 ;i < 5;i ++){
          int number=  scanner.nextInt();
          array[i] = number;
        }
        for(int i = 0 ; i < array.length ; i ++ ){
            for(int j = 0 ; j < array.length - i ; j ++ ){
                if(array[j] > array[j + 1]){
                    int tmp = array[j];
                    array[j] = array[j+1];
                    array[j+1]= tmp;
                }
            }
        }

        for(int i =0 ; i< array.length;i++){
            System.out.print(array[i]+"");
        }


    }
}
